package com.wulian.common.util;


/**
 * 
* @ClassName: Const 
* @Description: TODO(常量基类) 
* @author 马志豪
* @date 2019年9月10日 下午3:24:39 
*
 */
public class Const {

    /**
     * 编码
     */
    public static final String ENCODE = "UTF-8";
    /**
     * 错误异常
     */
    public static final String ERROR = "ERROR";
    /**
     * 成功
     */
    public static final String SUCCESS = "SUCCESS";
    /**
     * 验证失败
     */
    public static final String FAIL = "FAIL";
    /**
     * 验证失败但会返回空的等结果信息
     */
    public static final String FAILBACK = "FAILBACK";
    /**
     * Sessin id
     */
    public static final String SESSION_ID = "sessionId";
    /**
     * ACCESS_TOKEN Key
     */
    public static final String ACCESS_TOKEN = "accessToken";
    /**
     * UserId Key
     */
    public static final String ACCESS_USER_ID = "userId";

    /**
     * sourceMode Key
     */
    public static final String SOURCE_MODE = "sourceMode";
    /**
     * 一天的秒数
     */
    public static final int SECOND_DAY = 86400;
    /**
     * 一个小时的秒数
     */
    public static final int SECOND_HOUR = 3600;
    /**
     * 一周的秒数
     */
    public static final int SECOND_WEEK = 7 * 24 * 60 * 60;
    /**
     * Session默认保持20分钟
     */
    public static final int SESSION_KEEP_LOGIN = 20 * 60;

    /**
     * 缓冲区大小
     */
    public static final Integer BUFFER_SIZE = 1024;
    /**
     * 业务跟踪ID
     */
    public static final String TRACE_ID = "TRACE_ID";


    /**
     * 英文标点符号
     */
    public static final String PUNCTUATION_DOUHAO = ",";
    public static final String PUNCTUATION_JUDIAN = ".";
    public static final String PUNCTUATION_WENHAO = "?";
    public static final String PUNCTUATION_MAOHAO = ":";
    public static final String PUNCTUATION_FENHAO = ";";
    /**
     * URL分隔符
     */
    public static final String SEPRATOR_URL = "/";
    /**
     * HTTP分隔符
     */
    public static final String SEPRATOR_HTTP = "//";
    /**
     * 文件后缀分隔符
     */
    public static final String SEPRATOR_FILE_SUFFIX = ".";
    /**
     * java包名分隔符
     */
    public static final String SEPRATOR_PACKAGE = ".";
    /**
     * 本地host domain
     */
    public static final String HOST_LOCAL_DOMAIN = "localhost";
    /**
     * 本地host ip
     */
    public static final String HOST_LOCAL_IP = "127.0.0.1";
    /**
     * KB
     */
    public static final String SIZE_KB = "KB";
    /**
     * MB
     */
    public static final String SIZE_MB = "MB";
    /**
     * GB
     */
    public static final String SIZE_GB = "GB";
    /**
     * 数字字母
     */
    public static String ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
    /**
     * 超时警告时间（发起到完成），单位毫秒
     */
    public static long WARN_TOTAL_TIME_OUT = 3000;

    /**
     * 超时警告时间（接收到完成），单位毫秒
     */
    public static long WARN_SERVER_TIME_OUT = 1000;

    /**
     * 超时警告时间（Service业务处理耗时），单位毫秒
     */
    public static long WARN_SERVICE_TIME_OUT = 500;

    /**
     * Cookie 有效期（s）
     */
    public static int COOKIE_MAXAGE = SECOND_WEEK;
    /**
     * 分页大小-默认
     */
    public static int PAGE_SIZE = 10;
    /**
     * 分页大小-最小
     */
    public static int PAGE_SIZE_MIN = 5;
    /**
     * 分页大小-最大
     */
    public static int PAGE_SIZE_MAX = 50;
    /**
     * 控制请求次数的时间（秒）
     */
    public static int REQUEST_TIMES_TIME = 1;
    /**
     * 控制请求可疑次数
     */
    public static int REQUEST_TIMES_SUSPICIOUS = 10;
    /**
     * TOKEN有效期, 默认一周的秒数
     */
    public static int TOKEN_EXPIRE = SECOND_WEEK;
}
